package app.stock.common;

public class Stock implements Comparable {
	public static String label = "统计";
	public String code;
	public static String codeName = "code";
	public static String codeLabel = "代码";
	public String name;
	public static String nameName = "name";
	public static String nameLabel = "名称";
	
	public float currentPrice;
	public static String currentPriceName = "currentPrice";
	public static String currentPriceLabel = "当前价";
	public int currentAmount;
	public static String currentAmountName = "currentAmount";
	public static String currentAmountLabel = "持股数";
	public float currentMarketValue;
	public static String currentMarketValueName = "currentMarketValue";
	public static String currentMarketValueLabel = "市值";
	public float currentMarketValueRate;
	public static String currentMarketValueRateName = "currentMarketValueRate";
	public static String currentMarketValueRateLabel = "持仓比";	
	public float currentInvestment;
	public static String currentInvestmentName = "currentInvestment";
	public static String currentInvestmentLabel = "持股成本";
	public float currentInvestmentPrice;
	public static String currentInvestmentPriceName = "currentInvestmentPrice";
	public static String currentInvestmentPriceLabel = "持股均价";
	
	public float thisProfitWithoutCurrentMarketValue;	
	public static String thisProfitWithoutCurrentMarketValueName = "thisProfitWithoutCurrentMarketValue";
	public static String thisProfitWithoutCurrentMarketValueLabel = "盈亏(不计市值)";
	public float thisBaobenPrice;
	public static String thisBaobenPriceName = "thisBaobenPrice";
	public static String thisBaobenPriceLabel = "保本价";
	public float thisInvestment;	
	public static String thisInvestmentName = "thisInvestment";
	public static String thisInvestmentLabel = "累计买入";
	public float thisProfit;	
	public static String thisProfitName = "thisProfit";
	public static String thisProfitLabel = "盈亏";
	public float thisProfitRate;
	public static String thisProfitRateName = "thisProfitRate";
	public static String thisProfitRateLabel = "盈亏率";
	public float thisInvestmentPrice;
	public static String thisInvestmentPriceName = "thisInvestmentPrice";
	public static String thisInvestmentPriceLabel = "买入均价";

	public float transactionedProfitWithoutCurrentMarketValue;	
	public static String transactionedProfitWithoutCurrentMarketValueName = "transactionedProfitWithoutCurrentMarketValue";
	public static String transactionedProfitWithoutCurrentMarketValueLabel = "交易盈亏";
	public float transactionedBaobenPrice;
	public static String transactionedBaobenPriceName = "transactionedBaobenPrice";
	public static String transactionedBaobenPriceLabel = "保本价";
	public float transactionedInvestment;	
	public static String transactionedInvestmentName = "transactionedInvestment";
	public static String transactionedInvestmentLabel = "累计买入";
	public float transactionedProfit;	
	public static String transactionedProfitName = "transactionedProfit";
	public static String transactionedProfitLabel = "盈亏";
	public float transactionedProfitRate;
	public static String transactionedProfitRateName = "transactionedProfitRate";
	public static String transactionedProfitRateLabel = "盈亏率";
	
	public float stockInvestment;
	public static String stockInvestmentName = "stockInvestment";
	public static String stockInvestmentLabel = "累计买入";
	public float stockProfitWithoutCurrentMarketValue;
	public static String stockProfitWithoutCurrentMarketValueName = "stockProfitWithoutCurrentMarketValue";
	public static String stockProfitWithoutCurrentMarketValueLabel = "盈亏(不计市值)";
	public float stockBaobenPrice;
	public static String stockBaobenPriceName = "stockBaobenPrice";
	public static String stockBaobenPriceLabel = "保本价";	
	public float stockProfit;
	public static String stockProfitName = "stockProfit";
	public static String stockProfitLabel = "盈亏";
	public float stockProfitRate;
	public static String stockProfitRateName = "stockProfitRate";
	public static String stockProfitRateLabel = "盈亏率";
	

	public String toString() {
		return this.code + this.name + "(" + this.currentAmount + ":" + this.currentMarketValue + ":" + this.stockProfit + ")";
	}

	public int compareTo(Object o) {
		Stock st = (Stock) o;
		if (this.code == null || st.code == null) {
			return 0;
		}
		return this.code.compareTo(st.code);
	}
}
